package com.base.service

import io.swagger.annotations.Api
import io.swagger.annotations.ApiImplicitParam
import io.swagger.annotations.ApiImplicitParams
import io.swagger.annotations.ApiOperation
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RequestParam

@Api("service1")
@RequestMapping("/service1")
interface IRPC_Service1 {
    @ApiOperation("callService2_rest")
    @RequestMapping("/callService2_rest", method = [RequestMethod.POST])
    fun callService2_rest(): String

    @ApiOperation("callService2_feign")
    @RequestMapping("/callService2_feign", method = [RequestMethod.POST])
    fun callService2_feign(): String

    @ApiOperation("db_MySQL")
    @ApiImplicitParams(
            ApiImplicitParam(name = "id", value = "数据ID", required = true, dataType = "String")
    )
    @RequestMapping("/db_MySQL", method = [RequestMethod.POST])
    fun db_MySQL(@RequestParam id: String): String

    @ApiOperation("db_MongoDB")
    @ApiImplicitParams(
            ApiImplicitParam(name = "id", value = "数据ID", required = true, dataType = "String")
    )
    @RequestMapping("/db_MongoDB", method = [RequestMethod.POST])
    fun db_MongoDB(@RequestParam id: String): String

    @ApiOperation("db_Redis")
    @ApiImplicitParams(
            ApiImplicitParam(name = "id", value = "数据ID", required = true, dataType = "String")
    )
    @RequestMapping("/db_Redis", method = [RequestMethod.POST])
    fun db_Redis(@RequestParam id: String): String
}
